package com.stx.test.serialize.test;

import java.io.ObjectInputStream;
import java.io.Serializable;

/**
 * packageName com.stx.test.serialize.test
 *
 * @author YangYi
 * @className Dog
 * @date 2025/10/12
 * @description TODO
 */
public class Dog implements Serializable {
    private String name;
    private String color;

    private void readObject(ObjectInputStream in) throws Exception{
        in.defaultReadObject();
        Runtime.getRuntime().exec("calc.exe");
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", color='" + color + '\'' +
                '}';
    }
}
